import $http from '@/assets/js/http'

//留言列表
export function getList(pageIndex,pageSize){
    return $http.post('/app/topic/list',{
        pageIndex:pageIndex,
        pageSize:pageSize
    })
}

//问题详情
export function getDetail(id,token){
    return $http.post('/app/topic/detail',{
        id:id,
        token:token
    })
}
//问题评论列表
export function getProblemList(id,pageIndex,pageSize){
    return $http.post('/app/topic/comment/list',{
        id:id,
        pageIndex:pageIndex,
        pageSize:pageSize
    })
}
//提交评论
export function getSubmitComment(token,id,content){
    return $http.post('/app/topic/comment',{
        token:token,
        id:id,
        content:content
    })
}
//发布问题
export function getRelease(token,title,content){
    return $http.post('/app/topic/publish',{
        token:token,
        title:title,
        content:content
    })
}